<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <button id="btn">新歌速递</button>
  <ul id="ul">

  </ul>

  <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
  <script>
    const btn = document.getElementById('btn');
    btn.addEventListener('click', () => {
      let data = {}

      $.ajax({
        url: 'http://192.168.31.45:3000/top/song?type=7',
        method: 'GET',
        dataType: 'json',
        success: function(res) {
          console.log(res);
          data = res
        }
      })

      console.log(data);
    })
  </script>

</body>
</html>